
def options(opt):
    opt.decomposers.add_option("--ptscotch", action="store", type="string", metavar="SCOTCH_ROOT", default="", help="Path to PT-Scotch root directory.")

def configure(ctx):
    if "HAVE_SCOTCH" in ctx.env.DEFINES_SCOTCH:
        ctx.link_cxx(name="ptscotch", header_name="mpi.h ptscotch.h", libs=["ptscotch", "scotch", "scotcherr"], root=ctx.options.ptscotch)
